package com.gitee.ly;

import org.noear.solon.annotation.Inject;
import org.noear.solon.annotation.Mapping;
import org.noear.solon.annotation.Remoting;

import java.net.InetAddress;
import java.net.UnknownHostException;

@Mapping("/rpc")
@Remoting
public class TestRpcServiceImpl implements TestRpcService {
    @Inject("${server.port}")
    int appPort;

    @Override
    public String getStrOnce() throws UnknownHostException {
        String ip = InetAddress.getLocalHost().getHostAddress();
        String s = "rpc-solon-main1   " + ip + ":" + appPort;

        return s;
    }
}
